package com.abc.robot01.room.dao

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.Query
import com.abc.robot01.room.bean.CmdBean

@Dao
interface CmdDao {
    @Insert
    fun addCmd(cmd: CmdBean): Long

    @Query("SELECT * FROM cmd")
    fun queryAll(): List<CmdBean>

    /**
     */
    @Query("DELETE FROM cmd")
    fun deleteAll(): Int

    /**
     */
    @Query("DELETE FROM cmd WHERE id=:id")
    fun deleteById(id: Long): Int
}